<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>权限管理系统后台</title>
	<meta name="renderer" content="webkit">	
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">	
	<meta name="apple-mobile-web-app-capable" content="yes">	
	<meta name="format-detection" content="telephone=no">	
	<!-- load css -->
	<link rel="stylesheet" type="text/css" href="${basePath}common/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="${basePath}admin/css/login.css" media="all">
</head>
<body>
<div class="layui-canvs"></div>
<div class="layui-layout layui-layout-login">
	<h1>
		 <strong>权限管理系统后台</strong>
		 <em>authority management</em>
	</h1>
	<form id="myform">
		<div class="layui-user-icon larry-login">
			 <input type="text" placeholder="账号" id="userCode" name="userCode" class="login_txtbx" />
		</div>
		<div class="layui-pwd-icon larry-login">
			 <input type="password" placeholder="密码" id="userPassword" name="userPassword" class="login_txtbx" />
		</div>
		<!-- 
	    <div class="layui-val-icon larry-login">
	    	<div class="layui-code-box">
	    		<input type="text" id="code" name="code" placeholder="验证码" maxlength="4" class="login_txtbx">
	            <img src="${basePath}admin/images/verifyimg.png" alt="" class="verifyImg" id="verifyImg" onclick="javascript:this.src='xxx'+Math.random();">
	    	</div>
	    </div> -->
	    <div class="layui-submit larry-login">
	    	<input type="button" value="立即登陆" class="submit_btn"/>
	    </div>
    </form>
    <div class="layui-login-text">
    	<p>© 2016-2017  xxxxx 版权所有</p>
      <p>xxxx <a href="#" title="">xxxxx.com</a></p>
    </div>
</div>
<script type="text/javascript" src="${basePath}common/layui/lay/dest/layui.all.js"></script>
<script type="text/javascript" src="${basePath}admin/js/login.js"></script>
<script type="text/javascript" src="${basePath}admin/jsplug/jparticle.jquery.js"></script>
<script type="text/javascript">
var basePath="${basePath}";
$(function(){
	layui.use('layer', function(){
	  var layer = layui.layer;
	  
	  //登录链接测试，使用时可删除
	  $(".submit_btn").click(function(){
		  var bo=true;
		  $("#myform input").each(function(index,el){
			    var msg=$(el).attr("placeholder");
			    if($(el).val()==""){
			    	layer.msg("请输入"+msg+"!");
			    	bo=false;
			    	return false;
			    }
		  });
		  if(bo){
			    var data=$("#myform").serialize();
		      $.post(basePath+"login",data,function(result){
		    	   layer.msg(result.msg);
		    	   if(result.state){
		    		   location.href=basePath+"index";
		    	   }
		      });
		  }
	  });
	  
	  $("#userPassword,#userCode").on("keyup",function(e){
		  if(e.keyCode==13){
			  $(".submit_btn").click();   
		  }
	  })
	});
	
	$(".layui-canvs").jParticle({
		background: "#141414",
		color: "#E6E6E6"
	});
});
</script>
</body>
</html>